#include <stdio.h>      // for printf()
#include <windows.h>    // for interacting with Windows

void setup()
{
    printf("- setup() called.\n");
};

void update()
{
    printf("- update() called.\n");
};

void draw()
{
    printf("- draw() called.\n");
};

int main( void )
{
    setup(); // call setup()
    
    int frameCounter=0; // declare and initialize a variable of (int)eger type for keeping track of the number of frame since execution began
    
    while( true ) // execute while condition inside () is true
    {        
        printf("Current frame number: %i\n", frameCounter); // print the frame count       

        update();   // update frame
        draw();     // render frame
        if(GetAsyncKeyState(VK_ESCAPE)) // check for escape key pressed
        {
            break; // exit while()
        }
        Sleep(50);    // wait 50 milliseconds then continue executing
 
        frameCounter = frameCounter+1; // increase our frame counter by 1

    };
   
    return 0; // exit from the function returning an (int)eger
}
